package com.woniu.outlet.client;

import com.woniu.inlet.vo.UserCoupon;
import org.apache.catalina.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

@Component
@FeignClient(value = "finance-promotion")
public interface UserOpenFeign {

    @GetMapping("/coupon/pay")
    public Object couponPay(@RequestParam("userId") Integer userId, @RequestParam("money") BigDecimal money);

    //支付模块使用优惠券支付
    @GetMapping("/coupon/use")
    public void useCoupon(@RequestParam("userCouponId") Integer userCouponId);

    //根据id查询优惠券
    @GetMapping("/coupon/usercoupon/{id}")
    public UserCoupon getUsercoupnById(@PathVariable("id") Integer id);
}
